package com.yingside.exception;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test4 {
    public static void main(String[] args) {
        String str = "2020111111";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        FileInputStream fileInputStream = null;
        try {
            fileInputStream = new FileInputStream("");
            Date d = sdf.parse(str);
            fileInputStream.read();

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (ParseException e) {
            e.printStackTrace();
        } catch(Exception e){
            e.printStackTrace();
        } finally {
            try {
                fileInputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


    }
}
